package com.example.shopping.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.shopping.pojo.domain.GoodsBean;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * @author Dream
 * @version 1.0
 * @date 2020/11/9 11:48
 */
@Mapper
@Component
public interface GoodsDao extends BaseMapper<GoodsBean> {

    /**
     * 查询商品
     * @param value
     * @return
     */
    List<GoodsBean> getAll(@Param(value="value") String value);

    /**
     * 查询商品
     * @param goodsId
     * @return
     */
    GoodsBean getById(Integer goodsId);
    /**
     * 添加新商品
     * @param goodsBean
     */
    void addGoods(GoodsBean goodsBean);

    /**
     * 修改商品属性
     * @param goodsBean
     */
    void updateGoods(GoodsBean goodsBean);
}
